<?php
$main = [
    'aliases' => [
        '@bower' => '@vendor/bower-asset',
        '@npm'   => '@vendor/npm-asset',
    ],
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'components' => [
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
        'assetManager' => [
            // 'appendTimestamp' => true,
        ],
        'authManager' => [
            'class' => 'yii\rbac\DbManager', // 使用数据库管理配置文件
        ]
    ],
];
if (file_exists(__DIR__ . '/db.php')) {
    $db = require(__DIR__ . '/db.php');
    $main['components'] = array_merge($main['components'], (array)$db);
}
if (file_exists(__DIR__ . '/db-local.php')) {
    $db = require(__DIR__ . '/db-local.php');
    $main['components'] = array_merge($main['components'], (array)$db);
}
return $main;
